<?php
//字符集
header('content-type:text/html;charset=utf-8');
//连接增产改查轮子
include './login_CRUD.php';
//连接数据库
$coon = connectDB('127.0.0.1','root','qq553408','test2106');
//获取表单数据
$bname = $_GET["bname"];//书名
$username = $_GET["username"];//当前登陆用户

//测试连接数据库连接失败
if(!$coon){
    die('error for mysql: ' . mysqli_error($coon));
}
//连接成功
else{
    $regSql = " delete from books where `bname` = '$bname' AND `username` = '$username' ";
    mysqli_query($coon,$regSql);

    echo 0;
}



?>